Skip to content

fix(gooddata-eval): treat alert proposal part as confirmation signal - #1699

Merged
myhoai merged 3 commits into
masterfrom
QA-28774-alert-proposal-fallback
Jul 31, 2026
Merged

fix(gooddata-eval): treat alert proposal part as confirmation signal#1699
myhoai merged 3 commits into
masterfrom
QA-28774-alert-proposal-fallback

Conversation

@myhoai

@myhoai myhoai commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

JIRA: QA-28774

Summary by CodeRabbit

  • New Features

    • Alert proposals are now displayed as readable messages with confirmation details, recipients, comparisons, and dashboard information.
    • Proposal-only responses can trigger clarification and confirmation flows, enabling alert creation without accompanying text.
    • Alert proposal data is preserved in chat results, including unresolved proposals.
  • Bug Fixes

    • Improved handling of responses containing alert proposals but no message text.
  • Tests

    • Added coverage for proposal rendering, streaming responses, clarification, and alert creation.

JIRA: QA-28774

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@myhoai
myhoai requested review from hkad98, lupko and pcerny as code owners July 31, 2026 02:36
@myhoai
myhoai enabled auto-merge July 31, 2026 02:36
@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0e8dac51-6374-46fe-851c-ca6e491b6cb2

📥 Commits

Reviewing files that changed from the base of the PR and between b1d5012 and 56cbe09.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • Dockerfile
  • pyproject.toml

📝 Walkthrough

Walkthrough

Alert proposals now flow through SSE parsing, ChatResult, proposal rendering, and clarification handling. Proposal-only responses produce simulated-user text and support confirmation-based alert creation. Docker and tox configuration now document and constrain uv installation.

Changes

Alert proposal flow

Layer / File(s) Summary
Proposal transport and model contract
packages/gooddata-eval/src/gooddata_eval/core/chat/sse_client.py, packages/gooddata-eval/src/gooddata_eval/core/models.py, packages/gooddata-eval/tests/test_sse_client.py
SSE handling collects alertProposal payloads and exposes them as ChatResult.alert_proposals. Null payloads become empty proposal objects, and absent proposals default to an empty list.
Proposal rendering and clarification handling
packages/gooddata-eval/src/gooddata_eval/core/agentic/alert_skill.py, packages/gooddata-eval/src/gooddata_eval/core/agentic/conversation.py
Alert proposals render as JSON text with the CTA while excluding execution data. Proposal-only responses now trigger clarification handling.
Proposal workflow regression coverage
packages/gooddata-eval/tests/test_agentic_alert_skill.py, packages/gooddata-eval/tests/test_agentic_conversation.py
Tests verify rendered fields, CTA fallback, execution-data omission, simulated confirmation, clarification tracking, and alert creation.

uv installation configuration

Layer / File(s) Summary
uv installation constraint
Dockerfile, pyproject.toml
The tox dependency group adds a bounded uv version. Docker comments document index resolution and alignment with the required uv version.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: lupko, pcerny, hkad98

Sequence Diagram(s)

sequenceDiagram
  participant SSEClient
  participant ChatResult
  participant ConversationLoop
  participant render_alert_proposal
  participant SimulatedUser
  participant AlertCreation
  SSEClient->>ChatResult: Provide alertProposals
  ChatResult->>ConversationLoop: Provide proposal-only response
  ConversationLoop->>render_alert_proposal: Render latest proposal
  render_alert_proposal->>SimulatedUser: Send proposal text and CTA
  SimulatedUser->>ConversationLoop: Return confirmation
  ConversationLoop->>AlertCreation: Create metric alert
Loading

Poem

A rabbit formats alerts in a row,
With CTA and details ready to show.
Execution stays out of sight,
Confirmation makes the flow take flight,
Then alert creation starts just right.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 44.44% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the primary change: treating alert proposal parts as confirmation signals in gooddata-eval.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/gooddata-eval/src/gooddata_eval/core/agentic/alert_skill.py`:
- Around line 329-330: Update the alert handling around the proposal processing
so summary["alert"] is assigned whenever the proposal contains an alert,
including after execution is removed and the alert becomes empty; do not gate
the assignment on alert truthiness. Add a regression case covering an alert
containing only {"execution": {...}} and verify the resulting summary omits the
execution payload.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 42c63366-50ac-425e-8c43-d993aa8026fb

📥 Commits

Reviewing files that changed from the base of the PR and between 0382d27 and e8f35dd.

📒 Files selected for processing (7)
  • packages/gooddata-eval/src/gooddata_eval/core/agentic/alert_skill.py
  • packages/gooddata-eval/src/gooddata_eval/core/agentic/conversation.py
  • packages/gooddata-eval/src/gooddata_eval/core/chat/sse_client.py
  • packages/gooddata-eval/src/gooddata_eval/core/models.py
  • packages/gooddata-eval/tests/test_agentic_alert_skill.py
  • packages/gooddata-eval/tests/test_agentic_conversation.py
  • packages/gooddata-eval/tests/test_sse_client.py

Comment thread packages/gooddata-eval/src/gooddata_eval/core/agentic/alert_skill.py Outdated
myhoai and others added 2 commits July 31, 2026 10:03
… field

JIRA: QA-28774

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Unrelated to the rest of this PR; unblocks `unit-tests`, which every
Python-changing PR now hits.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@codecov

codecov Bot commented Jul 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.30%. Comparing base (0382d27) to head (56cbe09).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1699      +/-   ##
==========================================
+ Coverage   78.05%   78.30%   +0.24%     
==========================================
  Files         271      271              
  Lines       18676    18689      +13     
==========================================
+ Hits        14578    14634      +56     
+ Misses       4098     4055      -43     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@myhoai
myhoai merged commit acfcc1a into master Jul 31, 2026
13 checks passed
@myhoai
myhoai deleted the QA-28774-alert-proposal-fallback branch July 31, 2026 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants